package com.tanhua.dubbo.api.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.tanhua.dubbo.api.UserFreezeApi;
import com.tanhua.dubbo.mapper.UserFreezeMapper;
import com.tanhua.dubbo.pojo.UserFreeze;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @author TICO
 * @date 2021/6/22 9:47
 */

@DubboService(version = "1.0.0")
public class UserFreezeApiImpl implements UserFreezeApi {

    @Autowired
    private UserFreezeMapper userFreezeMapper;

    @Override
    public UserFreeze findIsFreeze(Long userId) {

        QueryWrapper<UserFreeze> queryWrapper = new QueryWrapper<>();

        queryWrapper.eq("user_id",userId);

        UserFreeze userFreeze = userFreezeMapper.selectOne(queryWrapper);

        return userFreeze;

    }
}
